package cz.vse.javaee.album;

/**
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: 19.4.11
 * Time: 20:06
 * To change this template use File | Settings | File Templates.
 */
@EntityFragment(
        id = "p.id=:photoId",
        read = "select p.id, p.name, p.description, p.album.name from Photo p",
        write = "update Photo p set p.name=:photoName, p.description=:photoDescription")
public class PhotoWithAlbumBasicTO {
    @Index(0)
    private int photoId;
    @Index(1)
    private String photoName;
    @Index(2)
    private String photoDescription;
    @Index(3)
    private String albumName;

    public int getPhotoId() {
        return photoId;
    }

    public void setPhotoId(int photoId) {
        this.photoId = photoId;
    }

    public String getPhotoName() {
        return photoName;
    }

    public void setPhotoName(String photoName) {
        this.photoName = photoName;
    }

    public String getPhotoDescription() {
        return photoDescription;
    }

    public void setPhotoDescription(String photoDescription) {
        this.photoDescription = photoDescription;
    }

    public String getAlbumName() {
        return albumName;
    }

    public void setAlbumName(String albumName) {
        this.albumName = albumName;
    }
}